import { dataQueryAxios, financialProductAxios } from '@/utils/request'

//企业榜单卡片

export const getCompanyRanksList = (data: any) => {
  return dataQueryAxios({
    url: '/api/data-query/v1/companies/ranks',
    method: 'get',
    params: data
  })
}
//企业榜单列表

export const getCompanyRanksTableList = (data: any) => {
  return financialProductAxios({
    url: '/be-cyzz-enterprise-figure/rank/search/page',
    method: 'post',
    data
  })
}

//企业资质卡片

export const getQualificationsList = (data: any) => {
  return dataQueryAxios({
    url: '/api/data-query/v1/companies/qualifications',
    method: 'get',
    params: data
  })
}

//企业资质列表

export const getQualificationsTableList = (data: any) => {
  return financialProductAxios({
    url: '/be-cyzz-enterprise-figure/qualification/search/page',
    method: 'post',
    data
  })
}

// 资质列表查看全部资质
export const getQualityList = (data: any) => {
  return financialProductAxios({
    url: `/be-cyzz-enterprise-figure/qualification/search/page`,
    method: 'post',
    data
  })
}

//收藏

export const setFavorite = (data: any) => {
  return dataQueryAxios({
    url: '/api/data-query/v1/favorites/companies',
    method: 'post',
    data
  })
}

//取消收藏

export const cancelFavorite = (data: any) => {
  return dataQueryAxios({
    url: `/api/data-query/v1/favorites/companies/${data.id}`,
    method: 'delete',
    data
  })
}

// 获取收藏列表
export const getFavoriteList = (data: any) => {
  return dataQueryAxios({
    url: '/api/data-query/v1/favorites/companies',
    method: 'get',
    params: data
  })
}
